# $Id$
# Maintainer: Jan de Groot  <jgc@archlinux.org>
pkgname=libwnck
pkgver=2.31.0
pkgrel=1
pkgdesc="Window Navigator Construction Kit"
arch=('i686' 'x86_64')
license=('LGPL')
depends=('gtk2' 'startup-notification' 'libxres')
makedepends=('libxt' 'intltool' 'gobject-introspection' 'python2')
url="http://www.gnome.org/"
source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver:0:4}/${pkgname}-${pkgver}.tar.xz
        WindowActionMenu-unset-window-and-stop-async-events-on-dispose.patch)
sha256sums=('83f732d20781fc88b22cdc6aaf2d4f388db6d3d4ff28d1a8fd45be9fb7743a9e'
            'a4a359027f3297847e7d3c9d8cefc6404a927ad6fb5aed864f58524834c60980')

prepare() {
  cd $pkgname-$pkgver
  patch -Np1 -i ../WindowActionMenu-unset-window-and-stop-async-events-on-dispose.patch
}
build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    ./configure --prefix=/usr --sysconfdir=/etc \
        --localstatedir=/var --disable-static
    make
}

package() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install

    #The binaries are shipped in libwnck3
    rm -f "${pkgdir}/usr/bin/wnckprop"
    rm -f "${pkgdir}/usr/bin/wnck-urgency-monitor"
    rmdir "${pkgdir}/usr/bin"
}
